The Geometric Distribution
- Random: unsigned int gsl_ran_geometric (const gsl_rng * r, double p)
-
This function returns a random integer from the geometric distribution,
the number of independent trials with probability p until the
first success. The probability distribution for geometric variates
is,
p(k) = p (1-p)^(k-1)
for
k >= 1.
- Function: double gsl_ran_geometric_pdf (unsigned int k, double p)
-
This function computes the probability p(k) of obtaining k
from a geometric distribution with probability parameter p, using
the formula given above.